package br.com.ozsolucoes.util;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import br.com.ozsolucoes.entity.Categoria;

public class CategoriaConveter implements Converter {

	@Override
	public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
		Categoria categoria = new Categoria();
		categoria.setCategoria(arg2);
		return categoria;
	}

	@Override
	public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
		return arg2.toString();
	}

}
